//
//  LuYouVC.m
//  OCStudy
//
//  Created by tomato on 2022/8/12.
//

#import "LuYouVC.h"
#import "MGJRouter.h"

@interface LuYouVC ()

@end

@implementation LuYouVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *btn = [[UIButton alloc]init];
    btn.frame =CGRectMake(50,50,200,50);
    [btn setTitle:@"跳到页面"forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor blueColor]forState:UIControlStateNormal];
    [self.view addSubview:btn];
    [btn addTarget:self action:@selector(goToVC)forControlEvents:UIControlEventTouchUpInside];
    
}

-(void)goToVC{
    
    //不带参数跳转
//    [MGJRouter openURL:@"tmd://test/pushToVC"
//          withUserInfo:@{@"navigationVC" :self.navigationController}
//            completion:nil];
    //带参数跳转
    [MGJRouter openURL:@"tmd://test/pushToVCWithCanShu"
          withUserInfo:@{@"navigationVC" : self.navigationController,
                         @"userPhone": @"1383838438",
                         }
            completion:nil];
    //获取对象
//    [self.navigationController pushViewController:[MGJRouter objectForURL:@"tmd://test/getTestVC" withUserInfo:@{ @"userPhone": @"1383838438"}] animated:YES];
}

@end
